home *** CD-ROM | disk | FTP | other *** search
/ Network CD 1 / Network CD.iso / ncomm / scripts / couchrx.ncomm < prev    next >
Text File  |  1993-05-24  |  678b  |  43 lines

  1. /* ARexx script that does "WHEN" type checking via lastpos and logs you into a BBS */
  2.  
  3. username = "Torkel Lodberg\n"
  4. password = "\p\n"
  5.  
  6. options results
  7. address 'ncomm'
  8.  
  9. clearbuffer
  10.  
  11. inactivity 0
  12.  
  13. usersent = FALSE
  14. passsent = FALSE
  15.  
  16. do forever
  17.     wait
  18.     if RC == 20 then exit
  19.  
  20.     name = lastpos('FIRST name',result)
  21.     pass = lastpos('(dots will echo):',result)
  22.         getout = lastpos('Main Command',result)
  23.  
  24.     if name ~= 0 & usersent == FALSE then
  25.     do
  26.         send username
  27.                 usersent = TRUE
  28.     end
  29.  
  30.     if pass ~= 0 & passsent == FALSE then
  31.     do
  32.         send password
  33.         passsent = TRUE
  34.     end
  35.  
  36.         if getout ~= 0 then
  37.     do
  38.         simplereq 'Entered Main Menu!'
  39.                 exit
  40.     end
  41.  
  42. end
  43.